// 导入axios配置
import service from '../utils/request'

// 登录
export function loginTosystem(username, password) {
    return service.get('/login/loginTosystem', {
        headers: { 'Content-Type': 'application/json' },
        params: {
            username: username,
            password: password
        }
    })
}

// 获取登录人员姓名
export function findName(username) {
    return service.get('/login/findName', {
        headers: { 'Content-Type': 'application/json'},
        params: {
            username: username
        }
    })
}

// 删除学生成绩信息
export function deleteStudentScore(stutentId) {
    return service.get('/studentScore/deleteStudentScore', {
        headers: { 'Content-Type': 'application/json' },
        params: {
            studentId: stutentId
        }
    })
}

// 查找所有学生成绩
export function findStudentScoreInfo() {
    return service.get('/studentScore/findStudentScoreInfo', {
        headers: { 'Content-Type': 'application/json' }
    })
}

// 判断学号是否存在
export function findStudentId(studentId) {
    return service.get('/studentScore/findStudentId', {
        headers: { 'Content-Type': 'application/json' },
        params: {
            studentId: studentId
        }
    })
}
